// 商品品牌-规格-型号 类型
export type ExpandparamValueList = {
  id: string;
  releExpandparamId: string;
  goodsId: string;
  expandparamId: string;
  expandparamValueId: string;
  expandparamValueName: string;
  expandparamName: string;
  createTime: string;
  delFlag: string;
};
// 产品器械信息
export type ApparatusCategory = {
  id?: string | number;
  apparatusCategoryId?: string | number;
  apparatusCategoryName: string | number; // 器械类别名称
  apparatusCategoryLevel: string | number; // 器械类别等级
  createTime?: string | number;
  modifyTime?: string | number;
  delFlag?: string | number;
};

// 产品信息
export type GoodsIntro = {
  productName?: string; // 产品名称
  packingUnit?: string; // 销售单位
  productionEnterprise?: string; // 生产企业
  registrant?: string; // 注册人
  registrationNumber?: string; // 注册证号
  validityPeriod?: string; // 有效期
  methodApplication?: string; // 使用方法
  applicationScope?: string; // 适用范围
  contraindication?: string; // 禁忌症
  productFormation?: string; // 产品组成
};

export type FieldConfig = {
  label: string;
  prop: keyof GoodsIntro; // 确保 prop 只能是 GoodsIntro 的键
};

// 商品证件
export type GoodsQualificationList = {
  id: string | number;
  goodsImg: string; // 商品主图
  qualificationImg: string; // 证件照片
  supplierQualificationId: string;
  qualificationCode: string; // 证件编号
  supplierId: string;
  qualificationType: string;
  effectiveDate: string;
  expiredDate: string;
  expFlag?: string;
  delFlag?: string;
  enableFlag?: string;
  supplierName: string;
};
export type ComboItemList = {
  goodsName: string;
  id: string;
  comboGoodsId: string;
  goodsId: string;
  num: number;
};
export type GoodsList = {
  goodsId: string | number;
  goodsImg: string; // 商品主图
  goodsSalesPrice: string; // 商品价格
  goodsSubtitle: string; // 商品描述
  goodsName: string; // 商品名称
  goodsExpandparamValueList: ExpandparamValueList[];
  apparatusCategory?: ApparatusCategory;
  supplierName?: string;
  goodsIntro?: GoodsIntro;
  supplierId: string;
  instructions?: []; // 商品详情图片
  goodsDetailImg?: []; // 商品详情图片
  goodsQualificationList?: GoodsQualificationList[]; // 商品证件
  minimumQuantity: number; // 最小起订量
  amount?: number; // 购买数量
  factoryName?: string;
  stock?: number;
  unit?: string;
  isCombo?: string; // 是否是套装
  afterPhone: string; // 客服热线
  goodsCatNameFirst?: string;
  goodsCatNameSecond?: string;
  salesFlag?: string;
  comboItemList?: ComboItemList[];
};

// 购物车类型
export type CartItemList = {
  amount: number;
  cartItemId: string;
  customerId: string;
  isChecked: boolean;
  id: number | string;
  goodsId: string;
  goodsName: string;
  goodsSubtitle: string;
  goodsImg: string;
  goodsSpec: string;
  goodsDesc: null;
  price: number;
  currentPrice: number;
  delFlag: string;
  goodsStatus: string;
  minimumQuantity: number;
  discountPrice: number;
  goodsExpandparamValueList: ExpandparamValueList[];
};
export type CarList = {
  cartId: string;
  cartItemList: CartItemList[];
  id: number | string;
  customerId: string;
  supplierId: string;
  supplierName: string;
  isChecked: boolean;
};

// 结算页面类型
export type SettlementList = {
  cartId: string;
  cartItemList: CartItemList[];
  id: number | string;
  customerId: string;
  supplierId: string;
  supplierName: string;
  buyerRemark: string;
};

// 地址类型
export type AddressDefault = {
  id: string | number;
  shippingAddressDetail: string; // 详细地址
  shippingMobile: string; // 联系电话
  shippingPerson: string; // 收货人
  defaultFlag: string | null; // YES 为默认地址
};

export type OrderGoodsList = {
  orderGoodsId: string;
  goodsId: string;
  orderId: string;
  goodsName: string;
  goodsSubtitle: string;
  goodsImg: string;
  goodsSpec: string;
  goodsDesc: string;
  amount: number;
  price: number;
  totalPrice: number;
  discountPrice: number;
};
// 订单类型
export type OrderDetail = {
  orderId: string;
  supplierName: string;
  orderCode: string;
  buyerRemark: string;
  createTime: string;
  shippingDetail: string;
  shippingPerson: string;
  shippingMobile: string;
  payProof: string;
  orderStatus: string;
  afterSaleFlag: string;
  trackingNumber: string | null;
  orderPrice: string | number;
  orderReceivePrice: string | number;
  orderGoodsList: OrderGoodsList[];
};
